apiVersion: apps/v1
kind: Deployment
metadata:
  name: angie-deployment
  namespace: angie
  labels:
    app: angie
spec:
  selector:
    matchLabels:
      app: angie
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
  template:
    metadata:
      labels:
        app: angie
    spec:
      containers:
        - name: angie
          image: docker.angie.software/angie:latest
          ports:
            - containerPort: 80
          resources:
            requests:
              memory: 800Mi
              cpu: 100m
            limits:
              memory: 900Mi
              cpu: 200m
          startupProbe:
            httpGet:
              path: /
              port: 80
            failureThreshold: 30
            periodSeconds: 10
          livenessProbe:
          # readinessProbe:
            httpGet:
              path: /
              port: 80
            initialDelaySeconds: 3
            periodSeconds: 10
            failureThreshold: 3
            timeoutSeconds: 1
            successThreshold: 1
---
apiVersion: v1
kind: Service
metadata:
  name: angie-service
  namespace: angie
spec:
  ports:
    - name: http
      port: 80
      targetPort: 80
  selector:
    app: angie
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: angie-ingress
  namespace: angie
  annotations:
    kubernetes.io/ingress.class: traefik
    cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
  rules:
    - host: testangie.corepaha.ru
      http:
        paths:
          - pathType: Prefix
            path: /
            backend:
              service:
                name: angie-service
                port:
                  number: 80
  tls:
  - hosts:
    - testangie.corepaha.ru
    secretName: testangie-tls